<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common_head', TEMPLATE_INCLUDEPATH)) : (include template('common_head', TEMPLATE_INCLUDEPATH));?>

<script src="<?php echo TEMPLATE_PATH;?>js/jquery-2.1.3.min.js"></script>
	
				<style>
.lp-list-box {
    margin-bottom: 0;
}
.lp-box-shadow {
    box-shadow: 0 1px 2px rgba(220,220,220,.4);
}
.lp-box {
    padding: 0 .75rem;
    background-color: #fff;
}
.box1 {
    overflow: hidden;
    margin: 0 0 .625rem;
    padding: 0 .6875rem;
    background: #fff;
}
.box1, .nav {
    box-shadow: 0 .0625rem .125rem rgba(0,0,0,.15);
}
.box1, .box1 .tit, .label {
    display: block;
}

.lp-list-box .action-list {
    margin-top: 0;
}
.action-list {
    margin: 1.5625rem 0 0;
}
li, ul {
    list-style: none;
}

.lp-list-box .action-list li {
    padding: .5rem 0;
    margin: 0 0 .375rem;
}
.action-list li {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    padding: 0 0 .8125rem;
    margin: 0 0 .8125rem;
}
.action-list .content {
    display: block;
    overflow: hidden;
    color: #333;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 100%;
}
a, a:hover {
    text-decoration: none;
}

.lp-list-box .lp-score-list .num-1, .lp-list-box .lp-score-list .num-2, .lp-list-box .lp-score-list .num-3 {
    color: #fff;
    border-radius: 50%;
    min-width: 0;
    margin-top: .75rem;
    margin-right: .625rem;
    margin-left: .3125rem;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    padding: 0;
    position: relative;
    font-size: 1.125rem;
    z-index: 3;
}
.lp-list-box .action-list .num {
<!-- width: 25px;
    padding-right: 2px; -->
    height: 100%;
}
.action-list .num {
    float: left;
    min-width: 2.125rem;
    line-height: 3.125rem;
    font-size: .9375rem;
    color: #828282;
    text-align: center;
    white-space: nowrap;
    <!-- font-style: italic; -->
}

.lp-list-box .lp-score-list .num-1::before, .lp-list-box .lp-score-list .num-2::before, .lp-list-box .lp-score-list .num-3::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    left: 1px;
    top: 0;
    border-radius: 50%;

    z-index: -1;
}

.action-list .user {
    overflow: hidden;
}

.lp-list-box .action-list .user .avatar {
    width: 3rem;
    height: 3rem;
}
.action-list .user .avatar {
    position: relative;
    float: left;
    width: 3.125rem;
    height: 3.125rem;
    margin: 0 .875rem 0 0;
}
.action-list .user .avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.lp-list-box .action-list .user .txt {
    font-size: 1rem;
    color: #333;
}
.action-list .user .txt {
    position: relative;
    display: block;
    padding: .5rem 0 0;
    font-size: 1.125rem;
    line-height: 1.2em;
}
.action-list .user .txt, .ar-nav-tit, .link-box .txt, .star-banner .user .name, .star-banner footer span, .vs-box .user .name {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.lp-list-box .action-list .user .step {
    color: #939393;
}
.action-list .user .step {
    display: block;
    margin: .5rem 0 0;
    font-size: .75rem;
    color: #828282;
    line-height: 1.2em;
}
.action-list .action {
    position: relative;
    overflow: hidden;
    width: 4rem;
    font-size: .625rem;
    color: #929292;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
a, a:hover {
    text-decoration: none;
}

.action-list .action {
    position: relative;
    overflow: hidden;
    width: 4rem;
    font-size: .625rem;
    color: #929292;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.action-list .action.like .icon, .action-list .action.liked .icon {
    background-position: -3.125rem 0;
    width: 1.6rem;
    height: 1.5rem;
}
.action-list .action .icon {
    position: relative;
    display: block;
    margin: 0 auto .3125rem;
}
.lp-box .icon {
    position: absolute;
    right: 0;
    bottom: 0;
}
.box1 .icon {
    position: absolute;
    right: 0;
    bottom: 0;
    width: .9375rem;
    height: .9375rem;
    background: url(https://h5.sinaimg.cn/weibocn/v6/img/lib/icons.a5c1305b.svg) no-repeat;
    background-size: 6.875rem 10.3125rem;
}

.action-list .action span {
    display: block;
    text-align: center;
}
</style>
				





<!-- <section class="p_10">
			<table class="table_record">
				<thead>
				<tr>
					<td style="width:35%;">姓名</td>
					<td style="width:45%;text-align:center;">时间</td>
					<td style="width:20%;text-align:center;">积分</td>
				</tr>
				</thead>
				<tbody>
			
			<?php  if(is_array($res)) { foreach($res as $i => $item) { ?>
					<tr>
						<td><?php  echo $item['nickname'];?></td>
						<td><?php  echo date('Y-m-d H:i:s',$item['time']);?></td>
						<td style="width:20%;text-align:center;"><?php  echo $item['fen'];?></td>
					</tr>
				<?php  } } ?>
				
				
				

				
				</tbody>
			</table>
		</section> -->
		
<input type="hidden" name="page" id="page" value="1" />	
<section class="box1 action-list-box lp-box lp-box-shadow lp-list-box">
            <ul class="action-list lp-score-list" id="pullrefresh">
              <?php  if(is_array($res)) { foreach($res as $i => $item) { ?> 
			  <li>
                    <a class="content" href="#">
                        <span class="num num-1"><?php  echo ++$i;?></span>
                        <div class="user">
                            <p class="avatar">
                                <img src="<?php  echo $item['avatar'];?>" alt=""></p>
                            <div class="info">
                                <p class="txt"><?php  echo $item['nickname'];?></p>
                                <span class="step noUnit"><?php  echo date('Y-m-d H:i:s',$item['time']);?>
								&nbsp;&nbsp;<?php  echo $item['shengfu'];?>
                               
								</span>
								
                            </div>
                        </div>
                    </a>
                    <a class="action like" href="javascript:;" data-oid="1022:230746_1_550_3574_5684117583_steps">
                        <p class="wrapper">
                            <!-- <i class="icon"></i> -->
							<i class="iconimg iconimg-s"><img width="23" height="23" src="<?php echo TEMPLATE_PATH;?>images/jifen.png" data-node="cMesImg"></i>
                            <span><?php  echo $item['fen'];?></span></p>
                    </a>
                </li>	
				
				<?php  } } ?>
              
            </ul>
</section> 
		
	<script>
	
	(function($) {
    $.extend({
        myTime: {
            /**
             * 当前时间戳
             * @return <int>        unix时间戳(秒)  
             */
            CurTime: function(){
                return Date.parse(new Date())/1000;
            },
            /**              
             * 日期 转换为 Unix时间戳
             * @param <string> 2014-01-01 20:20:20  日期格式              
             * @return <int>        unix时间戳(秒)              
             */
            DateToUnix: function(string) {
                var f = string.split(' ', 2);
                var d = (f[0] ? f[0] : '').split('-', 3);
                var t = (f[1] ? f[1] : '').split(':', 3);
                return (new Date(
                        parseInt(d[0], 10) || null,
                        (parseInt(d[1], 10) || 1) - 1,
                        parseInt(d[2], 10) || null,
                        parseInt(t[0], 10) || null,
                        parseInt(t[1], 10) || null,
                        parseInt(t[2], 10) || null
                        )).getTime() / 1000;
            },
            /**              
             * 时间戳转换日期              
             * @param <int> unixTime    待时间戳(秒)              
             * @param <bool> isFull    返回完整时间(Y-m-d 或者 Y-m-d H:i:s)              
             * @param <int>  timeZone   时区              
             */
            UnixToDate: function(unixTime, isFull, timeZone) {
                if (typeof (timeZone) == 'number')
                {
                    unixTime = parseInt(unixTime) + parseInt(timeZone) * 60 * 60;
                }
                var time = new Date(unixTime * 1000);
                var ymdhis = "";
                ymdhis += time.getUTCFullYear() + "-";
                ymdhis += (time.getUTCMonth()+1) + "-";
                ymdhis += time.getUTCDate();
              //  if (isFull === true)
              //  {
                    ymdhis += " " + time.getUTCHours() + ":";
                    ymdhis += time.getUTCMinutes() + ":";
                    ymdhis += time.getUTCSeconds();
              //  }
                return ymdhis;
            }
        }
    });
})(jQuery);
	
	
	</script>	
		
		
		
	<script>
	
		

			
		     $(document).ready(function() {
            $(window).scroll(function() {
                //$(document).scrollTop() 获取垂直滚动的距离
                //$(document).scrollLeft() 这是获取水平滚动条的距离
                if ($(document).scrollTop() <= 0) {
                  //  alert("滚动条已经到达顶部为0");
                }


			
				
				
				
				
                if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
                    //alert("滚动条已经到达底部为" + $(document).scrollTop);
					var html ='';
					var page = $("#page").val();
				
					$.post("<?php  echo $this->createMobileUrl('Ajaxresume',array())?>", { "page": page },
						  function(data){
				
						      for(var o in data){

							    o = parseInt(o);
								
								//var timestamp3 = data[o].time;
								//var newDate = new Date();
								//newDate.setTime(timestamp3 * 1000);
								
								//data[o].time = newDate.toLocaleDateString();
								data[o].time = $.myTime.UnixToDate(data[o].time,'true');
								//data[o].time = getLocalTime(data[o].time);
								//data[o].time = date('Y-m-d H:i:s',data[o].time);
								html += "<li>";
								html += "	<a class='content' href='#'>";
								html += "		<span class='num num-1'>"+(o+100)+"</span>";
								html += "		<div class='user'>";
								html += "			<p class='avatar'>";
								html += "				<img src='"+data[o].avatar+"'></p>";
								html += "			<div class='info'>";
								html += "				<p class='txt'>"+data[o].nickname+"</p>";
								html += "				<span class='step noUnit'>"+data[o].time+"&nbsp;&nbsp;&nbsp;"+data[o].shengfu+"";
											   
								html += "				</span>";
								html += "			</div>";
								html += "		</div>";
								html += "	</a>";
								html += "	<a class='action like' href='javascript:;' data-oid='1022:230746_1_550_3574_5684117583_steps'>";
								html += "		<p class='wrapper'>";
							
								html += "			<i class='iconimg iconimg-s'><img width='23' height='23' src='<?php echo TEMPLATE_PATH;?>images/jifen.png' data-node='cMesImg'></i>";
								html += "			<span><?php  echo $item['fen'];?></span></p>";
								html += "	</a>";
								html += "</li>";
								
								
								
								
								
								
								
								
								
							



								
							  } 
							  
						  //console.log(html);
						  if(html){
						  
						      ++page;
							  $("#pullrefresh").append(html);
							  $("#page").val(page);
						  }
						 
						  
						  }, "json");
                }
            });
        });
		
		</script>	


<?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common_foot', TEMPLATE_INCLUDEPATH)) : (include template('common_foot', TEMPLATE_INCLUDEPATH));?>